package com.sam.dynamic.project.ds1.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sam.dynamic.project.ds1.mapper.RoleMapper;
import com.sam.dynamic.project.ds1.model.entity.Role;
import com.sam.dynamic.project.ds1.service.RoleService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Sam
 * @apiNote 角色表 服务实现类
 * @since 2024-04-15 17:10:32
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void saveTrans(Role entity) {
        super.save(entity);
        throw new RuntimeException("测试异常哇");
    }
}
